.NET Framework Class Library |
BlockingCollection<(Of <(T>)>) Constructor (Int32) |
BlockingCollection<(Of <(T>)>) Class See Also Send Feedback |
Initializes a new instance of the BlockingCollection<(Of <(T>)>)
class with the specified upper-bound.
Namespace:
System.Collections.Concurrent
Assembly:
System.Threading (in System.Threading.dll)
Syntax
Visual Basic (Declaration) |
---|
Public Sub New ( _ boundedCapacity As Integer _ ) |
C# |
---|
public BlockingCollection( int boundedCapacity ) |
Parameters
- boundedCapacity
- Type: System..::.Int32
The bounded size of the collection.
Remarks
The default underlying collection is a ConcurrentQueue<T>.
Exceptions
Exception | Condition |
---|---|
System..::.ArgumentOutOfRangeException | The boundedCapacity is not a positive value. |